////////////////////////////////////////////////////////////////////////////////
//
//  FLYING KIWI BV
//  Copyright 2010 Flying Kiwi BV
//  All Rights Reserved.
//
//  NOTICE: Flying Kiwi permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
package plantool.modules.workplaces.windows {
	//--------------------------------------------------------------------------
	//  Imports
	//--------------------------------------------------------------------------
	import plantool.display.windows.TableRowEditWindow;
	import plantool.modules.workplaces.data.Workplace;
	
	
	//--------------------------------------------------------------------------
	//  [Metadata (Events, Style, Effects etc)]
	//--------------------------------------------------------------------------
	
	//--------------------------------------------------------------------------
	//  Class declaration
	//--------------------------------------------------------------------------
	public class WorkplaceWindow extends TableRowEditWindow {
		//--------------------------------------------------------------------------
		//Class constants
		//--------------------------------------------------------------------------
		
		//--------------------------------------------------------------------------
		//Class variables
		//--------------------------------------------------------------------------
		private var _workplace:Workplace		= new Workplace();
		
		//--------------------------------------------------------------------------
		//Class properties
		//--------------------------------------------------------------------------
		
		//--------------------------------------------------------------------------
		//Constructor and Destructor
		//--------------------------------------------------------------------------
		public function WorkplaceWindow() {
			super(workplaceApi.workplaceTable, _workplace);
		}
		
		//--------------------------------------------------------------------------
		//Class methods
		//--------------------------------------------------------------------------
		protected override function save():void {
			workplaceApi.saveWorkpace(_workplace, null, null);
			
			dispose();
		}
	}
}